package com.im.linving.apputils;

import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;

/**
 * @Author linyong
 * @Date 2016/10/31
 * @Time 23:07
 */
public class AppTools {

    public static String appSecret = "711c8303c7ba";

    /**
     * 获取 AppKey
     *
     * @return
     */
    public static String getAppKey() {
        try {
            ApplicationInfo appInfo = ApplicationUtils.getContext().getPackageManager()
                    .getApplicationInfo(ApplicationUtils.getContext().getPackageName(), PackageManager.GET_META_DATA);
            if (appInfo != null) {
                return appInfo.metaData.getString("com.netease.nim.appKey");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }


    public static String getAppSecret() {
        return appSecret;
    }

}
